<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        过滤前：<input type="text" v-model.trim='neirong'><br>
         <span> 过滤后: {{ neirong | guolv }} </span>
    </div>
    <script src="./js/vue.js"></script>
    <script> 
        Vue.filter('guolv',(val) => {
            return val.replace(/刺激|寄|唐|激/g,'***')
        })
        const ve = new Vue({
            el:'#app',
            data:{
              neirong:''
            }
        })
    </script>
</body>
</html>